package com.example.administrator.commonlyused;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;


public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    /**
     * 采用注解方式实现list(包含for循环造假数据)
     */
    private Button mCommentList;
    /**
     * 采用注解方式实现list(包含for循环造假数据)
     */
    private Button mCommentList01;
    /**
     * 时间选择
     */
    private Button mTimeSelection;
    /**
     * 时间选择2
     */
    private Button mTimeSelection2;
    /**
     * 百分百进度条
     */
    private Button mProgressBar;
    /**
     * greendao
     */
    private Button mGreendao;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        mCommentList = (Button) findViewById(R.id.commentList01);
        mCommentList.setOnClickListener(this);
        mCommentList01 = (Button) findViewById(R.id.commentList01);
        mCommentList01.setOnClickListener(this);
        mTimeSelection = (Button) findViewById(R.id.timeSelection);
        mTimeSelection.setOnClickListener(this);
        mTimeSelection2 = (Button) findViewById(R.id.timeSelection2);
        mTimeSelection2.setOnClickListener(this);
        mProgressBar = (Button) findViewById(R.id.progressBar);
        mProgressBar.setOnClickListener(this);
        mGreendao = (Button) findViewById(R.id.greendao);
        mGreendao.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            default:
                break;
            case R.id.commentList01:
                Intent intent = new Intent(MainActivity.this, AnnotationActivity_.class);
                startActivity(intent);
                break;
            case R.id.timeSelection:
                intent = new Intent(MainActivity.this, TimeSelectionActivity.class);
                startActivity(intent);
                break;
            case R.id.timeSelection2:
                intent = new Intent(MainActivity.this, TimeSelectionTwoActivity.class);
                startActivity(intent);
                break;
            case R.id.progressBar:

                break;
            case R.id.greendao:
                intent = new Intent(MainActivity.this, NoteActivity.class);
                startActivity(intent);
                break;
        }
    }
}
